str1=input()
count_1=0
count_2=0
n=len(str1)
for i in range(n):
    if('a'<=str1[i]<='z')or('A'<=str1[i]<='Z'):
        count_1+=1
    elif('0'<=str1[i]<='9'):
        count_2+=1
print("{} {}".format(count_1,count_2))
